<template>
  <div id="userLayout" :class="['user-layout-wrapper', isMobile && 'mobile']">
    <div class="container">
      <div class="top">
        <div class="header">
          <div class="content">
            <div class="nit_logo">
              <img src="~@/assets/nitlogo.png" style="height: 95%; width: 95%" alt="logo">
            </div>
            <div class="text">
              <span class="title">职称评审系统</span>
            </div>
          </div>
        </div>
        <div style="width: 100%;height: 8px;background: #295AC3;"></div>
      </div>
      <router-view />

      <div class="footer">
        <div class="copyright">
          版权归属: 浙大宁波理工学院
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { deviceMixin } from '@/store/device-mixin'

export default {
  name: 'UserLayout',
  mixins: [deviceMixin],
  mounted () {
    document.body.classList.add('userLayout')
  },
  beforeDestroy () {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang="less" scoped>

  .image {
    width: 100%;
    height: 100%;
  }

#userLayout.user-layout-wrapper {
    height: 100%;

    &.mobile {
      .container {
        .main {
          max-width: 368px;
          width: 98%;
        }
      }
    }

    .container {
      width: 100%;
      min-height: 100%;
      background: #f0f2f5 url(~@/assets/background.svg) no-repeat;
      background-size: 100% 100%;
      /*padding: 110px 0 144px;*/
      position: relative;
      a {
        text-decoration: none;
      }

      .top {
        text-align: center;

        .header {
          width: 100%;
          height: 60px;
          background: #FFFFFF;
          box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.5);
          display: flex;
          justify-content: center;
          .content {
            width: 82.2%;
            display: flex;
            align-items: center;
            flex-direction: row;
            justify-content: flex-start;
            .nit_logo {
              width: 267px;
              height: 60px;
              display: flex;
              justify-content: center;
            }
            .text {
              margin-left: 17px;
              height: 30px;
              font-size: 24px;
              font-family: PingFangSC-Semibold, PingFang SC;
              font-weight: 600;
              color: #333333;
              line-height: 30px;
            }

          }
          .badge {
            position: absolute;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
            margin-left: -12px;
            margin-top: -10px;
            opacity: 0.8;
          }

          .logo {
            height: 44px;
            vertical-align: top;
            margin-right: 16px;
            border-style: none;
          }

          .title {
            width: 144px;
            height: 30px;
            font-size: 24px;
            font-family: PingFangSC-Semibold, PingFang SC;
            font-weight: 600;
            color: #333333;
            line-height: 30px;
          }
        }
        .desc {
          font-size: 14px;
          color: rgba(0, 0, 0, 0.45);
          margin-top: 12px;
          margin-bottom: 40px;
        }
      }

      .main {
        min-width: 260px;
        width: 368px;
        margin: 0 auto;
      }

      .footer {
        height: 32px;
        background: #295AC3;
        position: absolute;
        width: 100%;
        bottom: 0;
        padding: 0 16px;
        margin: 48px 0 0px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        .copyright {
          width: 210px;
          height: 20px;
          font-size: 14px;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #F2F5F7;
          line-height: 20px;
        }
        .links {
          margin-bottom: 8px;
          font-size: 14px;
          a {
            color: rgba(0, 0, 0, 0.45);
            transition: all 0.3s;
            &:not(:last-child) {
              margin-right: 40px;
            }
          }
        }
      }
    }
  }
</style>
